//-------------------------------------------------------------------------------//
//                   TEST AUTOMATION TOOL : LICENSE                              //
//-------------------------------------------------------------------------------//
// This file is part of Test Automation Tool.                                    //
// Test Automation Tool is free software: you can redistribute it and/or modify  //
// it under the terms of the GNU General Public License as published by          //
// the Free Software Foundation, either version 3 of the License, or             //
// (at your option) any later version.                                           //
//                                                                               //
// Test Automation Tool is distributed in the hope that it will be useful,       //
// but WITHOUT ANY WARRANTY; without even the implied warranty of                //
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the                  //
// GNU General Public License for more details.                                  //
//                                                                               //
// You should have received a copy of the GNU General Public License             //
// along with Test Automation Tool. If not, see <http://www.gnu.org/licenses/>.  //
//                                                                               //
// This license doesn't force you to put any kind of banner or logo telling      //
// that you are using Test Automation Tool in your project but we would          //
// appreciate if you do so or, at least, if you let us know about that.          //
//                                                                               //
// Enjoy!                                                                        //
//                                                                               //
// Kinesis Team                                                                  //
//-------------------------------------------------------------------------------//

#ifndef __ITATTESTRESULTLOADER__
#define __ITATTESTRESULTLOADER__

#include <wx/string.h>

#include "TestResults/TATTestResultNode.h"


namespace Kinesis
{
namespace TestAutomationTool
{
namespace Backend
{

class TATTestResultNode;

/// <summary>
/// Converts a list of test results, whatever the way they are represented, into a test result tree 
/// and stores it.
/// </summary>
class ITATTestResultLoader
{
	// CONSTRUCTORS
	// ---------------
protected:

	/// <summary>
	/// Default constructor.
	/// </summary>
    ITATTestResultLoader(){};


	// DESTRUCTOR
	// ---------------
public:

	/// <summary>
	/// Destructor.
	/// </summary>		
    virtual ~ITATTestResultLoader(){};


	// METHODS
	// ---------------
public:

    /// <summary>
    /// Obtains the test results from the given source and transforms them into test result nodes
    /// of the internally stored tree.
    /// </summary>
    /// <param name="strSource">The source of the test results.</param>
    virtual void Load(const wxString &strSource)=0;

    /// <summary>
    /// Destroys the stored test result tree.
    /// </summary>
    virtual void Clear()=0;


	// PROPERTIES
	// ---------------
public:

    /// <summary>
    /// Gets the test result tree generated by the last load.
    /// </summary>
    /// <returns>
    /// A test result tree.
    /// </returns>
    virtual TATTestResultNode* GetTestResultTree() const=0;


	// ATTRIBUTES
	// ---------------
protected:

    /// <summary>
    /// The test result tree.
    /// </summary>
    TATTestResultNode* m_pTestResultTree;

};

} //namespace Backend
} //namespace TestAutomationTool
} //namespace Kinesis

#endif // __ITATTESTRESULTLOADER__
